﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Threading.Tasks;
using System.Threading;
using T.ServiceComponent.Log.SPI;
using T.FAS.Runtime.Metadata.Entity;
using T.FAS.Runtime.Metadata.Entity.DataModel;
using T.FAS.Runtime.Base.Entity;
using T.FAS.Runtime.DataAccess.SPI;
using System.Linq;
using Newtonsoft.Json;

namespace T.FAS.Runtime.DataAccess.Common
{
    public interface IDACLogService
    {
        ExecuteLogSetting ExecuteLogSetting { get; set; }
        void Write(object obj, ExtLogInfo extLogInfo = null);
        void WriteChangeLog(List<DataChangeLog> changeLogs, ExtLogInfo extLogInfo = null);
        void WriteError(Exception er, string Msg = null, ExtLogInfo extLogInfo = null);
        void WriteSQL(string SQL, IDbDataParameter[] paras = null, SQLLogType type = SQLLogType.DQL, ExtLogInfo extLogInfo = null);
        void WriteStateChangeLog(List<StateMachineChangedMsg> msgs, ExtLogInfo extLogInfo = null);
        void CDOTraceLog(CompositeDataObject cdo, TRecord record, InjectionMethodType opType ,string msg = null, object extObj = null);
    }

    public class ExtLogInfo
    {
        public string MetaDataID { get; set; }
        public string MetaDataCode { get; set; }
    }
}